import { defineStore } from 'pinia';

export const useFileListStore = defineStore('fileList', () => {
  const fileList = ref<any[]>([]);
  const addFile = (file: any) => {
    fileList.value.push(file);
  };

  const clearFileList = () => {
    fileList.value = [];
  };
  const getFileList = () => {
    return fileList.value;
  };
  return {
    fileList,
    addFile,
    getFileList,
    clearFileList,
  };
}, {
  persist: true,
});
